// 修改单个字段
export function update_status(id, val, field, name, model='admin') {
  const form = {}
  form.id = id
  form.field = field
  val === 1 ? form.val = 0 : form.val = 1
  return this.get(`/${model}/${name}/update`, form, 'post').then(e => {
    this.$msg_ok('success', '修改成功')
    return Promise.resolve(true)
  })
}

export default update_status
